package com.framework.network.remote

import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import java.io.Serializable

/**
 * @ClassName: BaseResponse
 * @Description: 接口返回的基本数据结构的基类
 * @Author: you
 */
@Keep
open class CommonResponse<T> : Serializable {
    @SerializedName("code", alternate = ["Code"])
    var code = 0

    @SerializedName("message", alternate = ["err_msg", "Msg", "msg"])
    var msg: String? = null

    @SerializedName("success")
    var success: Boolean? = null
}

@Keep
open class BaseResponse<T> : CommonResponse<T>() {
    @SerializedName("data", alternate = ["Data", "result"])
    var data: T? = null
}